1. Field of the Invention
This invention generally relates to a method and system for encoding an image signal so as to compress the image signal, and, in particular, to an image signal encoding method and system using codes having a particular format beginning with code length information followed by run-length information.
2. Description of the Prior Art
In general, image information is enormous in the quantity of data, so that if it is tried to store or transmit it as it is, it is required to provide a memory having an extremely large capacity and also the time required for transmitting image information of one page becomes extremely long, thereby causing practical inconveniences and disadvantages.
Under the circumstances, it has been proposed and is being currently applied to reduce the amount of information of image information by compressing the image information by encoding with the utilization of a particular characteristic of image information, in particular redundancy of image information. For example, among various facsimile machines for transmitting image information, in a G3 type facsimile machine, whose standard specification has been determined by the CCITT Recommendations T.4, use is made of the MH (Modified Huffman) encoding method as a standard method (one dimensional encoding method) for encoding image information. This MH encoding method is one of the run-length encoding methods which converts a run length corresponding to a distance between points of change appearing in a series of image data, and a Huffman code, which is one of optimal solutions of an instantaneous code, is represented by a combination of a terminating code and a make up code. With the use of such MH codes, the amount of hardware required for implementation of this encoding processing is reduced.
The MH codes are variable length codes defined by the number of bits ranging from 2 to 13 bits, and, thus, in order to carry out encoding and decoding operations using the MH codes in real time in association with the date transmission speed of a facsimile in use, a bit processing operation must be carried out at an extremely high speed. On the other hand, for example, the processing unit of a general purpose microprocessor is 8(4) or 16(32) bits, so that, if the data of the number of bits other than these is to be processed by a general purpose microprocessor, the format of the data must be adjusted before processing. Accordingly, to process variable length data requires an additional time period which can be extensive, thereby prohibiting to carry out data processing in real time. In order to compensate for this requirement of additional processing, there must be provided a dedicated hardware for carrying out encoding and decoding using the MH codes; however, this then pushes up the cost. Thus, the utilization of the MH codes conventionally negated the idea of direct application to general purpose microprocessors having a fixed format for data to be processed.